package com.lmt.ymcc.web.controller;

import com.lmt.ymcc.result.JSONResult;
import com.lmt.ymcc.service.ICreateTokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: TODO
 * @Author: Amazing
 * @Date: 2022/8/17 15:58
 * @Version: 1.0
 */
@RestController
public class CreateTokenController {

    @Autowired
    private ICreateTokenService createTokenService;

    @GetMapping("/createToken/{courseId}")
    public JSONResult createToken(@PathVariable("courseId")String courseId) {
        return JSONResult.success(createTokenService.createToken(courseId));
    }

}
